home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5476 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  25 lines

  1. Newsgroups: comp.lang.c
  2. Path: IVORY.trentu.ca!DPIDVERBNY
  3. From: dpidverbny@ivory.trentu.ca
  4. Subject: H-E-L-P!!!
  5. X-Nntp-Posting-Host: trentu.ca
  6. Message-ID: <DMGJvw.A0E@blaze.trentu.ca>
  7. Sender: news@blaze.trentu.ca (USENET News System)
  8. Reply-To: dpidverbny@ivory.trentu.ca
  9. Organization: Trent University, Peterborough
  10. Date: Thu, 8 Feb 1996 12:55:07 GMT
  11.  
  12. I was hoping that someone here might be able to help me.
  13. I am trying to return a float from a function call to a C written DLL in
  14. Visual Basic.  I have tested this code and it works fine with integers and
  15. longs but the minute I try to use a float, Visual Basic says that I have a 
  16. bad calling convention.  Visual Basic calls it floating point Single whereas
  17. C calls it float but both are 32-bit.  C uses IEEE convention and I have no
  18. idea what VB uses.
  19. The other weird problem that I have run across is trying to pass a string
  20. from VB into a DLL.  I have passed the string ByVal as the VB manual 
  21. suggests.  In my C DLL I can print the string and use string manipulation
  22. functions such as strlen().  However, the minute I try to use the string
  23. as a filename in fopen(), it doesn't work.  
  24. Any help will appriciated. -Dan
  25.